import request from '@/utils/request'

//查询主播信息列表
export function getList(params) {
    return request({
      url: `/anchor/life/merchant/list`,
      method: 'get',
      params
    })
  }

//创建合作关系
export function addanchor(data) {
  return request({
    url: '/anchor/life/merchant/add',
    method: 'post',
    data
  })
}

//修改合作关系
export function editanchor(data) {
  return request({
    url: '/anchor/life/merchant/edit/cooperation',
    method: 'put',
    data
  })
}

//查询抖音生活服务商家详情
export function merchantDetail(id) {
  return request({
    url: `/anchor/life/merchant/${id}`,
    method: 'get',
  })
}

//门店详情列表
export function detailList(id) {
  return request({
    url: `/anchor/life/merchant/merchant/detail/list/${id}`,
    method: 'get',
  })
}

//匹配门店信息
export function editPoi(data) {
  return request({
    url: '/anchor/life/merchant/edit/poi',
    method: 'put',
    data
  })
}

//重置主播密码
export function resetPwd(id) {
    return request({
      url: `/anchor/sys/user/resetPwd/${id}`,
      method: 'get',
    })
}

//获取主播信息详情
export function userInfo(id) {
    return request({
      url: `/anchor/sys/user/${id}`,
      method: 'get',
    })
}

//修改主播信息
export function editUser(data) {
    return request({
      url: `/anchor/sys/user`,
      method: 'put',
      data
    })
}

//前往管理端
export function redirect(id) {
    return request({
      url: `/anchor/sys/user/redirect/${id}`,
      method: 'get',
    })
}


